package o;

import android.content.Context;
import android.text.TextUtils;
import com.huawei.appgallery.serverreqkit.api.bean.ResponseBean;
import com.huawei.appgallery.serverreqkit.api.bean.ResponseBean.e;
import o.dfj.h;

public class dfo {
    private boolean ʼ = true;
    private String ˊ = ContentManager.getInstant().getContext().getString(h.ˊ);
    private boolean ˋ = false;
    private String ˎ = ContentManager.getInstant().getContext().getString(h.ˊॱ);
    private String ˏ = ContentManager.getInstant().getContext().getString(h.ॱˋ);
    private int ॱ = 1;

    public static dfo ˎ(BaseRequest o_cvu, ResponseBean responseBean, String str) {
        if (o_cvu == null || responseBean == null) {
            return new dfo();
        }
        if (responseBean.getResponseCode() == 1 && responseBean.getErrCause() == e.ˊ) {
            responseBean.setResponseCode(4);
        }
        return ˎ(responseBean.getResponseCode(), responseBean.getRtnCode_(), str);
    }

    public static dfo ˎ(int i, int i2, String str) {
        dfo o_dfo = new dfo();
        Context ˋ = ContentManager.getInstant().getContext();
        if (i == 0 && i2 == 0) {
            o_dfo.ˋ(0);
            o_dfo.ॱ("");
            o_dfo.ˏ("");
        } else if (i == 3 || !doo.ˊ(ˋ)) {
            o_dfo.ˋ(1);
            o_dfo.ˋ(true);
        } else if (i == 4) {
            o_dfo.ˋ(5);
            o_dfo.ˊ(str);
            o_dfo.ˋ(ˋ.getString(h.ˋॱ));
        } else if (i != 0) {
            o_dfo.ˋ(4);
            o_dfo.ॱ(ˋ.getString(h.ʽ));
            o_dfo.ˏ(ˋ.getString(h.ॱॱ));
        } else if (i2 != 0) {
            o_dfo.ˋ(5);
            o_dfo.ˊ(str);
            o_dfo.ˋ(ˋ.getString(h.ˋॱ));
        }
        return o_dfo;
    }

    public void ˊ(String str) {
        if (TextUtils.isEmpty(str)) {
            ॱ(ContentManager.getInstant().getContext().getString(h.ͺ));
            ˏ(ContentManager.getInstant().getContext().getString(h.ˏॱ));
            return;
        }
        ॱ(ContentManager.getInstant().getContext().getString(h.ॱˎ, new Object[]{str}));
        ˏ(ContentManager.getInstant().getContext().getString(h.ॱˊ, new Object[]{str}));
    }

    public String toString() {
        StringBuilder stringBuilder = new StringBuilder();
        stringBuilder.append("type:").append(ˋ()).append(", ");
        stringBuilder.append("showSetting:").append(ˎ()).append(", ");
        stringBuilder.append("supportRetry:").append(ˊ()).append(", ");
        stringBuilder.append("tips:").append(ॱ());
        return stringBuilder.toString();
    }

    public void ˏ(String str) {
        this.ˊ = str;
    }

    public void ˋ(String str) {
        this.ˎ = str;
    }

    public int ˋ() {
        return this.ॱ;
    }

    public void ˋ(int i) {
        this.ॱ = i;
    }

    public String ॱ() {
        return this.ˏ;
    }

    public void ॱ(String str) {
        this.ˏ = str;
    }

    public boolean ˎ() {
        return this.ˋ;
    }

    public void ˋ(boolean z) {
        this.ˋ = z;
    }

    public boolean ˊ() {
        return this.ʼ;
    }
}
